package org.jeecg.modules.basic.demo.apartment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.basic.demo.apartment.entity.LwgyBaseApartmentDistribute;
import org.jeecg.modules.basic.demo.apartment.entity.LwgyBaseApartmentDistributeXy;
import org.jeecg.modules.basic.demo.apartment.entity.LwgyBaseRoomNumber;
import org.jeecg.modules.basic.demo.bed.entity.LwgyBaseBed;

import java.util.List;
import java.util.Map;

/**
 * @Description: 房源分配管理
 * @Author: sn
 * @Date: 2021-10-25
 * @Version: V1.0
 */
public interface LwgyBaseApartmentDistributeMapper extends BaseMapper<LwgyBaseApartmentDistribute> {

	List<LwgyBaseApartmentDistribute> queryDistributeXqList();

	List<LwgyBaseApartmentDistribute> queryDistributeLhList(String campusId);

	List<LwgyBaseApartmentDistributeXy> queryDistributeXyByLhcode(String buildingId);


	List<LwgyBaseApartmentDistribute> queryDistributeRoomList(@Param("unitId")String unitId);

	List<LwgyBaseApartmentDistribute> queryAllRoomList(@Param("unitId")String unitId,@Param("chId")String chId);

	List<LwgyBaseApartmentDistribute> queryRoomList(@Param("unitId")String unitId,@Param("chId")String chId);

	List<LwgyBaseApartmentDistribute> queryRoomList2(@Param("unitId")String unitId,@Param("chId")String chId);

	List<LwgyBaseApartmentDistribute> queryRoomXlList(@Param("unitId")String unitId,@Param("chId")String chId);


	LwgyBaseApartmentDistributeXy queryDistributeXyByAdminId(String admin_id);

	List<LwgyBaseApartmentDistributeXy> queryDistributeFdyList(String campusId,String collegeId);

	List<LwgyBaseApartmentDistribute> queryDistributeLhByFdyList(@Param("adminId") List<String> adminId);

	List<LwgyBaseApartmentDistribute> queryDistributeRoomInfoByFdyList(String adminId,String buildingId);

	List<String> queryDistributeFdyInfoByCollegeIdList(String collegeId);

	/*@Select("SELECT\n" +
			"\tt1.`id` ,\n" +
			"\tt5.`name` AS campus_name,\n" +
			"\tt4.`name` AS building_name,\n" +
			"\tt3.`name` AS unit_name,\n" +
			"\tt2.`name` AS layer_name,\n" +
			"\tt1.`name` AS room_name\n" +
			"\n" +
			"FROM\n" +
			"\t( SELECT id, pid, room_type, `name` FROM lwgy_base_apartment WHERE type = 'room' ) t1\n" +
			"\tLEFT JOIN lwgy_base_apartment t2 ON t1.pid = t2.id\n" +
			"\tLEFT JOIN lwgy_base_apartment t3 ON t2.pid = t3.id\n" +
			"\tLEFT JOIN lwgy_base_apartment t4 ON t3.pid = t4.id\n" +
			"\tLEFT JOIN lwgy_base_apartment t5 ON t4.pid = t5.id \n" +
			"WHERE\n" +
			"\tt1.room_type = 'hotel_room'")
	List<LwgyBaseRoomNumber> queryAllRoomList();*/


}
